package cn.whale.task.api;

import cn.whale.basic.utils.JSONResult;
import cn.whale.task.domain.MqLog;
import cn.whale.task.fallback.PayResultToMQApiFallbackFactory;
import cn.whale.task.to.MQLogStatusUpdateTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "task-service",fallbackFactory = PayResultToMQApiFallbackFactory.class)
public interface PayResultToMQApi {

    @RequestMapping(value="/mqLog/save",method= RequestMethod.POST)
    JSONResult save(@RequestBody MqLog mqLog);

    @RequestMapping(value="/mqLog/updateStatusForMqLog",method= RequestMethod.POST)
    JSONResult updateStatusForMqLog(@RequestBody MQLogStatusUpdateTo to);
}
